colinuxfandomcom-20200214-history
FedoraHowTo
__TOC__ Users may experience significant troubles upgrading to Fedora Core 5 due to an error causing udev to be newer than the kernel. A custom kernel is likely required. If you use the newest kernel from henry styler udev problem will be solved quick notes for Fedora : * the XML file needs ' ro root=/dev/cobd0' instead of 'root=/dev/cobd0' in the section 'bootparams' * check the gateway defined in : /etc/sysconfig/network-scripts/ifcfg-eth0 * swap is /dev/cobd7 , not the usual /dev/cobd1 , adjust /etc/fstab if you need to. * use rpm --rebuilddb before running other up2date/yum/apt-get operations other than that, runs fine, good job. Because of the e2fsck problem I used ro as a bootparam but it boots read-only. You can also pass e2fsck by fastbooting Fedora. root=/dev/cobd0 fastboot nogui nogui is optional. It's advised, of course, that you set a password on "root" and also run "pwconv" to convert to shadow passwords. Nothing else so far. I could upgrade the base FC1 up to FC4 with simply the following commands: First run: * apt-get update * apt-get dist-upgrade Than simply edit /etc/apt/sources.list and incrase then number in the following line: rpm http://ayo.freshrpms.net /fexora/linux/1/i386.... First set it to 2, and then * apt-get update * apt-get upgrade * apt-get dist-upgrade And then go back, and incrase the number again. It was about 3 hours to get FC4 from FC1, but because of the network speed, and not because of bogous. It's cool! I am attempting to get VNC running for Fedora Core 1, using the downloaded distribution. I installed the following files * yum install vnc-server * yum install xterm * yum install XFree86-twm have been enough to get it running. Note: It saves a lot of time to configure yum to use a local mirror site by editing etc/yum.conf. to bypass the filesystem checks at boot of a redhat 9 system (should be like fedora) you can add to default.colinux.xml a line like this * root=/dev/cobd3 fastboot nogui this solves many of the problems lots of people had mentioned, including being able to have multiple mountpoints in /etc/fstab and accidentally trying to run gui mode at boot. Fedora Queries (1) Is there any advice on how to use coLinux with Fedora Core 1 already installed in partitions on the same drive as Windows XP? (2) Is there a distribution available of Fedora Core 2 for coLinux? Fedora Core 3 working * install FC3 natively (I used hda2 for swap, hda3 for /) * install colinux 2.6 shapshot (I used http://www.colinux.org/snapshots/coLinux-20041024.exe) * boot using one of the other images (I used the Debian one), and mount FC3 partition, use alias'es: ro root=/dev/cobd0 * copy content of "other image"/dev to FC3/dev # mkdir /mnt/hda3 # mount /dev/hda3 /mnt/hda3 # cp -a /dev/* /mnt/hda3/dev/ * edit /etc/fstab, replace LABEL=/ with proper device-name #LABEL=/ / ext3 defaults 1 1 /dev/hda3 / ext3 defaults 1 1 * boot from FC 1. image instead: ro root=/dev/hda3 * boot, and tell kudzu to "Keep" all hardware settings Fedora Core 3 - without using native installation. I installed FC3 in the same way I installed FC2 and FC Development, but I found this a lot easier because you do not need to manually remove any packages. Download and configure the Fedora Core 1 base image. You need to setup the networking depending on your machine. Don't forget to check /etc/resolv.conf. Edit /etc/apt/sources.list with nano or vim. One line should be uncommented under the "Fedora Linux 1" section. Towards the end of the line is a section ../1/.... changes the 1 to a 3. Save changes and exit. Now run "apt-get update" to download the package listings for FC3. When done run "apt-get dist-upgrade" I think it had to download around 90MB. You will also notice it is holding back to packages. To update these just do "apt-get install packagename1 packagename2". For me, one was "initscripts", the other was "util-linux". <TroKhon> After that i always get a blue screen when starting co Linux. Any advices? Response: see http://article.gmane.org/gmane.linux.colinux.devel/1904. Reboot and your done. One thing I did notice was sshd decided not to work for some reason, I was trying to get X11 forwarding, I think it was because I hadn't started XFS. A quick "apt-get remove openssh" followed by "apt-get install openssh" solved this. You can also use apt-get clean now to free up some disk space. The only other issue I have incurred is the loss of an initial console, /dev/console, due to a package being replaced by udev. To my knowledge this can't be added whilst the system is running as it would add it to a RAM disk. Instead, mount the image using another image (you can just copy it or use another copy of the FC1 image), then cd to the directory where you mounted it. eg: # mkdir /mnt/fc3 # mount /dev/cobdX /mnt/fc3 #Replace X with the relevant number. # cd /mnt/fc3 This should place you in the root directory of the FC3 image, now run # mknod -m 600 dev/console c 5 1 # mknod -m 666 dev/null c 1 3 #Just in case. # mknod -m 666 dev/zero c 1 5 I developed this script to create a Fedora Core 3 installation image from scratch. It works for me. Customize it to your own needs (e.g. installed packages, network setup). Put all the files, plus vmlinux-modules.tar.gz from your coLinux installation, in the same directory and run from that directory as root. <TimHarvey> Question: Why do you start with FC2 base then upgrade to FC3? Why not use an FC3 base? I installed FC3 directly (without the step of FC2). Thanks rpang, your script was very helpful. I had one trouble that, I'm not sure how, /dev/null was normal (non-special) empty file. So I removed it and did "mknod --mode=666 $MOUNTPOINT/dev/null c 1 3". makeroot: #!/bin/bash YUM0=http://mirror.stanford.edu/fedora/linux/core PACKAGES="yum passwd tcsh openssh-clients openssh-server vim-enhanced dhclient" ROOT_SIZE=1024 SWAP_SIZE=256 TMP=/tmp/fedora MOUNTPOINT=$TMP/mnt FILESYSTEM_IMAGE=$TMP/root SWAP_IMAGE=$TMP/swap VMLINUX_MODULES=vmlinux-modules.tar.gz rpm="rpm --root $MOUNTPOINT" yum="yum --installroot=$MOUNTPOINT -y" echo Creating temp directory $TMP... test -d $TMP || mkdir $TMP echo Creating filesystem image of $ROOT_SIZE megabytes... test -d $MOUNTPOINT && umount $MOUNTPOINT test -f $$FILESYSTEM_IMAGE && rm $FILESYSTEM_IMAGE dd if=/dev/zero of=$FILESYSTEM_IMAGE bs=1M count=$ROOT_SIZE echo Creating ext3 filesystem on $FILESYSTEM_IMAGE... mkfs.ext3 -F -j $FILESYSTEM_IMAGE echo Mounting filesystem... test -d $MOUNTPOINT || mkdir $MOUNTPOINT umount $MOUNTPOINT mount -o loop $FILESYSTEM_IMAGE $MOUNTPOINT || exit 1 echo Installing Fedora Core 2 base image... mkdir -p $MOUNTPOINT/var/lib/rpm $rpm --initdb || exit 1 $yum -c yum2.conf install $PACKAGES wget -P $MOUNTPOINT/root $YUM0/2/i386/os/Fedora/RPMS/dev-3.3.13-1.i386.rpm echo Creating coLinux device nodes... for i in `seq 0 31`; do mknod $MOUNTPOINT/dev/cobd$i b 117 $i done echo Creating config files... echo " /etc/hosts..." cat < $MOUNTPOINT/etc/hosts 127.0.0.1 localhost colinux EOF echo " /etc/resolv.conf..." cat < $MOUNTPOINT/etc/resolv.conf nameserver 192.168.0.1 EOF echo " /etc/fstab..." cat < $MOUNTPOINT/etc/fstab /dev/cobd0 / ext3 defaults 1 1 none /proc proc defaults 0 0 none /dev/pts devpts gid=5,mode=620 0 0 /dev/cobd1 swap swap defaults 0 0 EOF echo " /etc/sysconfig/network..." cat < $MOUNTPOINT/etc/sysconfig/network NETWORKING=yes HOSTNAME=colinux EOF cat < $MOUNTPOINT/etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.0.255 IPADDR=192.168.0.2 GATEWAY=192.168.0.1 NETMASK=255.255.255.0 NETWORK=192.168.0.0 ONBOOT=yes EOF echo Unpacking modules... tar zx -C $MOUNTPOINT -f $VMLINUX_MODULES echo Upgrading to Fedora Core 3... $rpm -U $YUM0/3/i386/os/Fedora/RPMS/fedora-release-3-8.i386.rpm $yum -c yum3.conf update $yum -c yum3.conf clean all umount $MOUNTPOINT echo Creating swap image of $SWAP_SIZE megabytes... test -f $SWAP_IMAGE && rm $SWAP_IMAGE dd if=/dev/zero of=$SWAP_IMAGE bs=1M count=$SWAP_SIZE Does anybody have an idea how do I set up an Inet/LAN connectivity if I have my Windows connected to the Inet with a L2TP Connection, which is made of two - LAN and VPN ( LAN connection gets an IP from CSP's DHCP, L2TP gets IP from ISP). What do I share with what (or bridge, if it's better)? yum2.conf: main cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 exactarch=1 retries=20 base name=Fedora Core 2 - $basearch - Base baseurl=$YUM0/2/$basearch/os/ # mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-2.us.west updates-released name=Fedora Core 2 - $basearch - Released Updates baseurl=$YUM0/updates/2/$basearch/ # mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc2.us.west yum3.conf: main cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 exactarch=1 retries=20 base name=Fedora Core 3 - $basearch - Base baseurl=$YUM0/3/$basearch/os/ # mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-3.us.west updates-released name=Fedora Core 3 - $basearch - Released Updates baseurl=$YUM0/updates/3/$basearch/ # mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc3.us.west last edited 2005-06-23 04:10:48 by 167 I follow the instruction on http://www.brandonhutchinson.com/Upgrading_Red_Hat_Linux_with_yum.html to upgrade from fedora core 1 minimal to core 4. It takes a bit longer time, but it works too ~ Today is: 27 October 2005: I have successfully installed fedora core 4 on the latest kernel downloaded from Colinux.org (not from Sourceforge). I am really happy since this has solved two problems: MySQL version and: Cyrus-Imap: finally working with Microsoft Outlook (there was a problem with IDLE). I just see the link above.. do not knoe them, I did it on my own way. I have updated from core 1 (the image from sourceforge) directly to 4 :). Anyway Colinux is a treasure. Converting native Fedora Core 4 to colinux * Standard FC3 and FC4 systems boot from a file /boot/initrd*.img, this is a compressed cpio for ramdisk boot. In this startup the script /init creates some devices, for sample console, null and zero on tmpfs /dev. If this devices in colinux don't exist, the /bin/init of your root file system can't run. Booting stops after such lines Warning: unable to open an initial console. kjournald starting. Commit interval 5 seconds To solve this, must create devices console, null and zero directly into the image or partion of root file system. You should use an other small coLinux image or a Knoppix boot (see above) -- MarqKole DateTime(2006-03-10T09|39:12Z) I've run into this problem, but creating a new initrd did not solve it. After much googling I found that a boot parameter made the difference. Add `devfs=mount` to your boot parameters (command line or XML file) so the `/dev` dir will be available in the right way to have /dev/console available during system initialization. Now my FC4 system works fine again uder colinux. ro devfs=mount root=/dev/cobd0 * If anybody interest, with this steps you can view into the initrd: # mkdir /tmp/initrd-fc4 # cd /tmp/initrd-fc4 # gunzip -dc /boot/initrd-2.6.11-1.1369_FC4.img | cpio -i # cat /tmp/initrd-fc4/init If you remove the loading of ext3.ko and jbd.ko from this script, you can use this initrd file also as initrd for coLinux. But then should not boot with "ro" * Edit /etc/fstab, change the LABEL to they real names such /dev/hda3 (see above) * Add ro fastboot nomodules to bootparams (see above) Fixup error mesage from hwclock * coLinux don't allow hwclock. Edit file /etc/rc.d/rc.sysinit, locate the line with hwclock and add a condition for colinux: if ! uname -r | grep -q -e "-co-" then /sbin/hwclock $CLOCKFLAGS fi * Edit file /etc/rc.d/init.d/halt, locate the line with hwclock and write a condition for colinux: if ! uname -r | grep -q -e "-co-" then runcmd $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS fi Fixup error mesage from setfont * After login, will show the error 'putfont: PIO_FONT: Function not supported'. coLinux can't set font. To solve this, create a wrapper for setfont: * Rename the program setfont to setfont.old # mv /bin/setfont /bin/setfont.old * Create a new script file /bin/setfont with condition for coLinux #!/bin/bash if ! uname -r | grep -q -e "-co-" then /bin/setfont.old $@ fi * and make it executable # chmod +x /bin/setfont Booting Fedora Core 4 Natively This is a _very_ high-level overview because I don't have time to document details right now. (I suggest using an image-based coLinux instance to compile the custom kernel and chroot from for the mkinitrd step.) # (Do this as root in your native Fedora install.) You'll need to adjust your SELinux policy - here's how: #* install the selinux-policy-targeted-sources package #* go to the /etc/selinux/targeted/src/policy/file_contexts/misc directory and create a local.fc file with this line: /dev/cobd^/* -b system_u:object_r:fixed_disk_device_t #* go to /etc/selinux/targeted/src/policy and "make install" # You'll need a custom kernel. See Building a custom kernel for info, look at the bottom for options to set. # You'll need to use the Fedora mkinitrd tool to make an initrd.gz file (use all the --no-whatever options) and set up coLinux to use that initrd image. Repository I have writen this to convert Fedora 5 native image to coLinux image. Mount the image to /coLinux/ from some other system. Use ":set ff=unix" in VI to convert to unix newline style. # Create devices: console, null and zero # (there are possibly no devices in /coImage/dev/ now) mknod -m 600 /coImage/dev/console c 5 1 mknod -m 666 /coImage/dev/null c 1 3 mknod -m 666 /coImage/dev/zero c 1 5 # Point fstab to coLinux block-devices sed -r -i 's|(.*)( / .*)|/dev/cobd0 \2|' /coImage/etc/fstab sed -r -i 's|(.*)( swap.*swap.*)|/dev/cobd7 \2|' /coImage/etc/fstab # Create block-devices at startup if ! grep -q "mknod /dev/cobd" /coImage/etc/rc.d/rc.sysinit; then sed -r -i 's|.*/sbin/start_udev.*|&\n\nfor i in `seq 0 7`; do mknod /dev/cobd$i b 117 $i; done;|' /coImage/etc/rc.d/rc.sysinit fi # Disable hwclock sed -r -i 's|^^#*/sbin/hwclock.*|# &|' /coImage/etc/rc.d/rc.sysinit sed -r -i 's|^^#*/sbin/hwclock.*|# &|' /coImage/etc/rc.d/init.d/halt # Fix "PIO_FONT: Function not implemented" if ! [ -f /coImage/bin/setfont.old ]; then mv /coImage/bin/setfont /coImage/bin/setfont.old echo '#!/bin/bash' > /coImage/bin/setfont echo 'if ! uname -r | grep -q -e "-co-"; then' >> /coImage/bin/setfont echo ' /bin/setfont.old $@' >> /coImage/bin/setfont echo 'fi' >> /coImage/bin/setfont chmod +x /coImage/bin/setfont fi ro root=/dev/cobd0 ---- MassTranslated on 25 Dec 2004. ---- MassTranslated on Sun Apr 23 17:36:08 UTC 2006